package com.zhiyin.seal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyin.seal.entity.AdminFunctionEntity;
import com.zhiyin.seal.entity.AdminSealEntity;
import com.zhiyin.seal.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface UserDao extends BaseMapper<UserEntity> {

    List<UserEntity> selectAllUserList(@Param("keywords") String keywords);

    List<UserEntity> getUserListByIds(@Param("userIds") List<Long> userIds);

    Integer insertUser(@Param("userEntity") UserEntity userEntity);

    UserEntity getUserInfoByOpenId(@Param("openId") String openId);

    UserEntity getUserInfoById(@Param("id") Long id);

    Integer updateUser(@Param("userEntity") UserEntity userEntity);

    List<AdminSealEntity> selectAdminSealList(@Param("userId") Long userId,@Param("companyId") Long companyId);

    Integer insertAdminSeal(@Param("adminSeal") AdminSealEntity adminSealEntity);

    List<AdminFunctionEntity> selectAdminFunctionList(@Param("userId") Long userId,@Param("companyId") Long companyId);

    Integer insertAdminFunction(@Param("adminFunction") AdminFunctionEntity adminFunctionEntity);

    Integer selectUserCount();
}
